﻿@model  IEnumerable<VOD.Models.PlayRecord>

<div class="myHistory">
    <div class="title clearfix">
        <h3>最近观看(@(Request.IsAuthenticated?Model.Count():0))</h3>
        <a id="myHistory_btn_ce" class="type_1" title="折叠/展开" href="javascript:;">折叠</a>
    </div>
    <div id="myHistory_view" class="show">
        @{
            if(Request.IsAuthenticated)
            {
                var i = 1;
                foreach(var record in Model){
                    <dl class="clearfix">
                        <dt>@record.PlayDate.ToString("MM-dd") 看过</dt>
                        <dd>
                            <a class="txt" href="@Url.Action("Play", "Video", new { id=record.VideoID,orderNum=record.VideoUrl.VideoOrder})">@record.Video.Name @record.VideoUrl.VideoOrder</a>
                        </dd>
                    </dl>
                    i++;
                    if(i>10){
                        break;
                    }
                }
            }
            else
            {
                <p>登录之后就能保存点播记录啦！</p>
            }
        }
    </div>
</div>